In the case that the weather is bad, the visibility and color of an image are usually degraded by the fog in the atmosphere. It is usually needed to improve the quality of images and videos captured in the weather by defogging. The process of removing the fog in an image is called image defogging.
Currently, there are many image defogging methods, in which an image defogging method based on dark channel prior is a method having the best effect. The dark channel prior is obtained by making statistics on an outdoor non-foggy image database, i.e. every local areas in outdoor non-foggy images have a pixel, the intensity value of at least one color channel of which is very low. A defogging model established by utilizing the dark channel prior can directly estimate the thickness of the fog, and can restore a foggy image to a high quality image after removing the interference of the fog (called defogged image for short).
In the image defogging method based on dark channel prior, an intensity value “J” of a defogged image is solved by using an intensity value “I”, an atmosphere light value “A”, and a transmission map t of an input fogging image according to a foggy image model I=Jt+A(1−t).
Currently, there are the following two image defogging methods based on dark channel prior: 1) acquiring a transmission map for performing defogging processing on the foggy image based on dark channel prior, optimizing the transmission map by soft matting interpolation, and solving the intensity value of the defogged image by using the optimized transmission map. The defect of this method lies in that the processing of soft matting interpolation takes too much time, leading to the completion of the processing of image defogging taking too much computation time. 2) filtering the minimum values of R, G, B components of every pixels in an input image by using a median filter to obtain the atmosphere light value and the transmission map for performing defogging processing on the input image, and solving the intensity value of the defogged image by using the atmosphere light value and the transmission map. The defect of this method lies in that existing median filters cannot obtain a defogged image of good enough effect.